package cn.net.yugu.doraemon.api.common.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @description:
 * @author: wanghongli
 * @create: 2022-09-20 13:04:39
 */
@Getter
@AllArgsConstructor
public enum CommonResultCode implements IErrorCode {
    /**
     * 成功.
     */
    SUCCESS(0, "successful"),
    FAIL(1, "fail"),
    EXCEPTION(-100, "server exception, msg is %s"),
    ILLEGAL_PARAM(-101, "illegal parameter, param is %s"),
    ILLEGAL_PARAM_LENGTH(-102, "illegal paramter length, param is %s"),
    ILLEGAL_AUTH(-103, "illegal auth"),
    ILLEGAL_AUTH_STATUS(-104, "illegal auth status, current status is %s"),
    ERROR_DB(-105, "db error"),
    ERROR_INVOKE_PROXY(-106, "invoke proxy error, proxy result code is %s, msg is %s"),
    ERROR_INVOKE_MESSAGECENTER(-109, "invoke messagecenter error, messagecenter result code is %s, msg is %s"),
    ERROR_DATA_NOT_EXISTS(-107, "%s data not exist"),
    ERROR_DATA_EXISTS(-108, "%s data exist"),
    DUBBO_RPC_ERROR(-109, "Dubbo rpc error,msg is %s"),
    QUOTA_FULL(-110, "quota full, quota is %s"),
    ERROR_BID(-111, "bid error, msg is %s");

    public final int code;
    public final String message;
}
